<!DOCTYPE html>

<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>用户注册</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
            box-sizing: border-box;
        }

        body{
            background-image: url("../static/images/black.png");
            padding-top: 25px;
        }

        .re_div{
            border: 8px solid #EEEEEE;
            width: 900px;
            height: 500px;
            background-color: white;
            margin: auto;
        }

        .cLeft{
            float: left;
            margin: 15px;
        }
        #p1{
            color: #FFD026;
            font-size: 20px;
        }
        #p2{
            color: #A6A6A6;
            font-size: 20px;
        }
        .cCenter{
            float: left;
        }
        .td_left{
            width: 100px;
            height: 50px;
            text-align: right;
            color: #A6A6A6;
        }
        .td_right{
            padding-left: 50px;
            color: #A6A6A6;
        }
        #username,#password,#email,#poseid,#sex,#phonenumber,#status,#userid,#usertype{
            width: 251px;
            height: 32px;
            border: 1px solid #A6A6A6;
            /*    设置边框圆角*/
            border-radius: 10px;
            padding-left: 10px;
        }
        #checkcode{
            width: 110px;
        }
        #cheImg{
            height: 32px;
            vertical-align: middle;
        }
        #btn_sub{
            width: 150px;
            height: 40px;
            background-color: #FFD026;
            border: 1px solid #FFD026;
        }
        .cRight{
            font-size: 15px;
            margin: 15px;
            float: right;
        }
        .cRight p a{
            color: pink;
        }

    </style>
</head>
<body>
<div class="re_div">
    <div class="cLeft">
        <p id="p1">更改密码</p>
        <p id="p2">UPDATA PASSWORD</p>
    </div>
    <div class="cCenter">
        <form th:action="@{/updatepassword1}" method="post">
            <table >

                <tr>
                    <td class=td_left><label for="input1">输入新密码 </label></td>
                    <td class=td_right><input type="password" name="password" id="input1" placeholder="输入新密码"></td>
                </tr>
                <tr>
                    <td class=td_left><label for="input2">输入新密码 </label></td>
                    <td class=td_right><input type="password" name="password2" id="input2" onblur="check2pwd()" placeholder="输入新密码"></td>
                </tr>
                <tr>
                    <td colspan="2" align="center"><input type="submit" id="btn_sub" value="提交"></td>
                </tr>
                </tr>
            </table>
        </form>
    </div>
</div>
<script>
    function check2pwd() {
        if(input1.value != input2.value) {
            alert("两次输入密码不一致！")
            input1.value = "";
            input2.value = "";
        }
        else{
            alert("更改成功")
        }
    }
</script>
</body>
</html>
